<template>
  <div>
    <a-drawer
      title="更多筛选"
      placement="top"
      :maskClosable="false"
      :visible.sync="filterDialog"
      :get-container="false"
      :wrap-style="{ position: 'absolute' }"
      @close="onClose"
    >
      <a-form layout="inline">
        <a-form-item label="创建时间">
          <a-range-picker
            format="YYYY-MM-DD"
            @change="onTime"
            v-model="defaulttimeList"
          >
            <template slot="dateRender" slot-scope="current">
              <div class="ant-calendar-date" :style="getcurrentStyle(current)">
                {{ current.date() }}
              </div>
            </template>
          </a-range-picker>
        </a-form-item>
        <a-form-item label="预分配单号">
          <a-input v-model="searchItem.orderCode" />
        </a-form-item>
        <a-form-item label="灌装单号">
          <a-input v-model="searchItem.packingPlanNo" />
        </a-form-item>
        <a-form-item label="精华液">
          <a-input v-model="searchItem.materialCodeName" />
        </a-form-item>
        <a-form-item label="批次号">
          <a-input v-model="searchItem.batchNo" />
        </a-form-item>
        <a-form-item>
          <a-button class="default-button" @click="searchTableFun">
            查询
          </a-button>
        </a-form-item>
      </a-form>
    </a-drawer>
  </div>
</template>
<script>
export default {
  props: {
    filterDialog: {
      type: Boolean,
      default: false,
    },
    searchItem: {
      type: Object,
      default: {},
    },
  },
  model: {
    prop: "filterDialog",
    event: "close",
  },
  data() {
    return {
      defaulttimeList:[],
    };
  },
  mounted() {},
  computed: {},
  methods: {
    onClose() {
      this.$emit("close", false);
    },
    onTime() {},
    //时间选择器的样式填充
    getcurrentStyle(current, today) {
      const style = {};
      if (current.date() === 1) {
        style.border = "1px solid #1890ff";
        style.borderRadius = "50%";
      }
      return style;
    },
    searchTableFun() {},
    addFun() {},
  },
};
</script>
<style scoped></style>
